from django.conf.urls import patterns, include, url
from mcom import views
import settings

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # url(r'^$', 'mcom.views.home', name='home'),
    url(r'^$', views.homepage), 
    url(r'^account/', include('accounts.urls')),
    url(r'^forum/', include('forum.urls')),
    url(r'^info/', include('info.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

if settings.DEBUG:
    urlpatterns += patterns('django.contrib.staticfiles.views',
        url(r'^media/(?P<path>.*)$', 'serve'),
        )
    urlpatterns += patterns('django.contrib.staticfiles.views',
        url(r'^static/(?P<path>.*)$', 'serve'),
        )

